package org.example.cloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author 宋孟林 
 * @description 
 * @date: 2025/4/11 9:41
 */
@RestController
@Slf4j
public class SlowCallController {
    @GetMapping("/testF")
    public String testF() throws NoSuchMethodException {
        try {
            TimeUnit.SECONDS.sleep(1);
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        log.info("新建慢调用熔断规则");
        return  "方法testF被调用";
    }
}
